﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AdvanceLib.ScriptCore;
using AdvanceLib.AddIn;
using AdvanceLib.ClassExtensions;

namespace AdvanceLib.Extension.XseScript.SystemCommands
{
    public class XseSection : SystemSection
    {
        #region Fields
        private ScriptHost _host;
        #endregion

        #region SpecialSection Member
        public override IExtensionProvider GetProvider()
        {
            return this._host.ExtensionManager.GetExtension<XseExtensionProvider>();
        }
        #endregion

        #region SpecialCommand Member
        public override string Name
        {
            get { return "xse"; }
        }
        public override int ExpectedParameters
        {
            get { return 1; }
        }
        public override void Execute(ScriptHost host, string[] parameters)
        {
            this._host = host;
            this.SectionName = parameters[0];
        }
        public override bool DebugParameter(int paramIndex, string paramValue)
        {
            return paramValue.IsPointerName();
        }
        #endregion
    }
}
